<?php

namespace Application\View\Helper;

use Zend\View\Helper\AbstractHelper;
use Zend\ServiceManager\ServiceLocatorAwareInterface;
use Zend\ServiceManager\ServiceLocatorInterface;
use \Zend\ServiceManager\ServiceLocatorAwareTrait;

class ReecritureParametreUrlHelper extends AbstractHelper implements ServiceLocatorAwareInterface {

  var $serviceTranslator = null;
  var $root_url = null;

  /** 
   * Set the service locator. 
   * 
   * @param ServiceLocatorInterface $serviceLocator 
   * @return CustomHelper 
   */  
  public function setServiceLocator(ServiceLocatorInterface $serviceLocator)  
  {  
      $this->serviceLocator = $serviceLocator;  
      return $this;  
  }  
  /** 
   * Get the service locator. 
   * 
   * @return \Zend\ServiceManager\ServiceLocatorInterface 
   */  
  public function getServiceLocator()  
  {  
      return $this->serviceLocator;  
  }


	public function __invoke( $libelle ) {
    // $config = $this->getServiceLocator()->getServiceLocator()->get('config'); 
    // $this->root_url = $config['root_url'];
    
    $this->serviceTranslator = $this->getServiceLocator()->getServiceLocator()->get('StringService'); 

		return $this->serviceTranslator->ReecritureParametresUrl( $libelle );
	}
}
